#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main(int argc, char *argv[])
{
	string line;
	int size = 0;
	vector<string> txt;
	
	while (getline(cin, line))
	{
		if (line == "q")
			break;
		txt.push_back(line);
	}
	
	for (int idx = 0; idx < txt.size(); idx++)
	{
		cout<<"#"<<idx<<" "<<txt[idx]<<" "<<txt[idx].size()<<endl;
		size += txt[idx].size();
	}
	
	cout<<"file lines : "<<txt.size()<<endl;
	cout<<"file size : "<<size<<endl;
	return 0;
}
